#ifndef CEGG_H_
#define CEGG_H_

#include "cocos2d.h"
#include "Nests.h"

USING_NS_CC;

class CEgg:public CCSprite{

public:
	static CEgg* CreateEggBYFileName(const char* filename);
	void updateRobin(float dt);
	void reset();
	int getState();
	void setState(int state);
	void setStartSpeed();
	void bindtoNests(Nests* nests);
	float getYSpeed();
	bool isNestMovingOrNot() ;
	void setNetstMoving(bool isNetstMoving);
	void setSpeedX(float speed);
	Nests* getBindingNest();
	bool getBindable();
	void setBindable(bool bable);
private:
	bool bindable;
	static const float startSpeed = 650;
	int _state;
	float _speedY;
	float _speedX;
	Nests* _nests;
	bool _isNetstMoving;

};

#endif /* CEGG_H_ */
